[mirrors]
http://download.redis.io/releases/redis-3.0.3.tar.gz

[vars]
filesize=1360959
sha512=68b2d85341487efed26c92cd7925b4e9d889b5a19f08f4695ffd07087c01ae0c872086575744636513b01720829002c8d5c7bf43b20ee2c561599fa8d1c475f5

[deps]


[build]

# patch is from arch linux
patch -p1 < "$K"/redis-sane-defaults.patch
sed -i "s@ar rcs@""$CROSS_COMPILE""ar rcs@" deps/hiredis/Makefile
sed -i 's@CC:=.*$@@' deps/hiredis/Makefile
# MALLOC=libc: use musl malloc instead of jemalloc. This might be bad for performance though,
# if that is important to you, you should make benchmarks (and share them)!
make MALLOC=libc LDFLAGS="$optldflags" CFLAGS="$optcflags" V=1 -j$MAKE_THREADS \
  AR="$CROSS_COMPILE""ar"

make PREFIX="$butch_install_dir" install
install -Dm400 redis.conf "$butch_install_dir"/etc/redis.conf


# install the service
IS="$K"/bin/install-service
"$IS" --down --log --force redis "$K"/services/redis
